import 'package:seedfour/generated/json/base/json_field.dart';
import 'package:seedfour/generated/json/user_account_entity.g.dart';
import 'dart:convert';

@JsonSerializable()
class UserAccountEntity {
	UserAccountBalance? balance;
	UserAccountMargin? margin;

	UserAccountEntity();

	factory UserAccountEntity.fromJson(Map<String, dynamic> json) => $UserAccountEntityFromJson(json);

	Map<String, dynamic> toJson() => $UserAccountEntityToJson(this);

	@override
	String toString() {
		return jsonEncode(this);
	}
}

@JsonSerializable()
class UserAccountBalance {
	int? total;
	String? sumAmount;
	String? plusAmount;
	String? minusAmount;
	List<UserAccountBalanceData>? data;
	List<UserAccountFundData>? allocData;

	UserAccountBalance();

	factory UserAccountBalance.fromJson(Map<String, dynamic> json) => $UserAccountBalanceFromJson(json);

	Map<String, dynamic> toJson() => $UserAccountBalanceToJson(this);

	@override
	String toString() {
		return jsonEncode(this);
	}
}

@JsonSerializable()
class UserAccountBalanceData {
	String? title;
	int? createdAt;
	String? amount;
	int? changeSubtype;
	String? afterBalance;
	String? remark;

	UserAccountBalanceData();

	factory UserAccountBalanceData.fromJson(Map<String, dynamic> json) => $UserAccountBalanceDataFromJson(json);

	Map<String, dynamic> toJson() => $UserAccountBalanceDataToJson(this);

	@override
	String toString() {
		return jsonEncode(this);
	}
}

@JsonSerializable()
class UserAccountFundData {
	late String uid = '';
	late String amount = '';
	late String name = '';
	late String mobile = '';

	UserAccountFundData();

	factory UserAccountFundData.fromJson(Map<String, dynamic> json) => $UserAccountFundDataFromJson(json);

	Map<String, dynamic> toJson() => $UserAccountFundDataToJson(this);

	@override
	String toString() {
		return jsonEncode(this);
	}
}

@JsonSerializable()
class UserAccountMargin {
	int? total;
	String? sumAmount;
	String? plusAmount;
	String? minusAmount;
	List<UserAccountMarginData>? data;

	UserAccountMargin();

	factory UserAccountMargin.fromJson(Map<String, dynamic> json) => $UserAccountMarginFromJson(json);

	Map<String, dynamic> toJson() => $UserAccountMarginToJson(this);

	@override
	String toString() {
		return jsonEncode(this);
	}
}

@JsonSerializable()
class UserAccountMarginData {
	int? createdAt;
	String? amount;
	int? orderStatus;
	int? marginDate;
	String? remark;

	UserAccountMarginData();

	factory UserAccountMarginData.fromJson(Map<String, dynamic> json) => $UserAccountMarginDataFromJson(json);

	Map<String, dynamic> toJson() => $UserAccountMarginDataToJson(this);

	@override
	String toString() {
		return jsonEncode(this);
	}
}